﻿Imports SystemInfoReporter.Core

''' <summary>
''' This class defines the interface that must be implemented
''' by all collectors.
''' </summary>
''' <remarks>
''' System info reporter instantiates all collector objects, then calls
''' their methods in the following sequence:
''' 
''' 1. Startup()
''' 2. Run()
''' 3. Cleanup()
''' 
''' Collectors are expected to catch all runtime errors and not throw
''' any exception to the system info reporter. The appropriate methods
''' of the writers should be used to indicate errors.
''' </remarks>
Public Interface ICollector

    ''' <summary>
    ''' Instructs the collector to initialize itself and read its
    ''' relevant configuration file.
    ''' </summary>
    ''' <param name="cfgFile">Configuration file of collector.</param>
    ''' <param name="writers">List of writers.</param>
    ''' <remarks>
    ''' A reference to the writers must be kept for use by the
    ''' Run() method.
    ''' </remarks>
    Sub Startup(ByVal cfgFile As String, ByVal writers As List(Of Writer.IWriter))

    ''' <summary>
    ''' Instructs the collector to perform its work.
    ''' </summary>
    ''' <remarks></remarks>
    Sub Run()

    ''' <summary>
    ''' Instructs the collector to perform cleanup.
    ''' </summary>
    ''' <remarks></remarks>
    Sub Cleanup()

End Interface
